<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的数据</title>
    <link rel="stylesheet" href="../../styles/main_table.css">
    <link rel="stylesheet" href="../../styles/common.css">
    <script src="../../libs/jquery.min.js"></script>
    <script src="../../scripts/config.js"></script>
    <script src="../../scripts/common.js"></script>
    <script src="../../scripts/my_data.js"></script>

</head>
<body>
    <div id="mydata">
        <div>
            <h1 style="text-align: center">我的数据</h1>
        </div>
        <div class="tab_div">
            <div style="margin: 10px;">
                <div style="display:inline-block;width:220px;">
                    <!--<input type="button" value="添加" class="data_btn" onclick="navGo(true)">-->
                    <input type="button" value="添加" class="data_btn" onclick="addDataShow()">
                    <input type="button" value="刷新" class="data_btn" onclick="refreshData()">
                </div>
                <div class="search-bar"  style="display:inline-block;width:370px;">
                    <form action="" class="search">
                        <input id="searchInput" type="search" class="search-input" placeholder="输入数据名称" oninput="searchDataChange()">
                        <input type="button" value="搜索" class="search-btn" onclick="searchData()">
                    </form>
                </div>
            </div>
            <table width="100%" class="table" id="data_table">
                <!--<caption>
                    <h2>我的数据</h2>
                </caption>-->
                <thead>
                <tr>
                    <th>数据名称</th>
                    <th>路径地址</th>
                    <th>数据描述</th>
                    <th style="width:40px;">状态</th>
                    <th style="width:40px;">删除</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
    <div id="adddata" hidden="true">
        <div>
            <h1 style="text-align: center">添加数据</h1>
        </div>
        <div class="tab_div">
            <hr>
                <div style="margin: 10px;height: 70px;">
                    <div style="display:inline-block;float:left">
                        <input type="button" value="返回" class="data_btn" onclick="navGo(false)">
                    </div>
                    <div style="display:inline-block;width:400px;float: right">
                        <label style="float:left;width:300px;">
                        <pre style="margin: 0px;">
1. 下载数据上传工具。
2.  通过上传工具进行数据上传。
3.  数据上传完毕后，填写以下内容。
4.  确认添加。
                        </pre>
                        </label>
                        <input type="button" value="上传工具" class="data_btn" onclick="downTools()">
                    </div>
                </div>
            <hr>
            <div>
                <form>
                    <label>数据名称</label>
                    <input type="text" class="data_input"/>
                    <br>

                    <label>路径地址</label>
                    <input type="text" class="data_input"/>
                    <br>

                    <label>数据描述</label>
                    <input type="text" class="data_input"/>
                    <br>

                    <input type="submit" value="添加数据" class="data_btn" style="position: relative;left: 70px;width: 100px;"/>
                </form>
            </div>
        </div>
    </div>

    <div class="wrap-dialog hide">
        <div class="dialog">
            <div class="dialog-header">
                <span class="dialog-title">删除确认</span>
            </div>
            <div class="dialog-body" style="height: 30px;">
                <span class="dialog-message">你确认删除该数据吗？</span>
            </div>
            <div class="dialog-footer">
                <input type="button" class="button_blue_style" id="confirm" value="确认" style="width: 80px;" onclick="delOk()"/>
                <input type="button" class="button_blue_style" id="cancel" value="取消" style="width: 80px;" onclick="delCancel()"/>
            </div>
        </div>
    </div>

    <div class="add-data-wrap-dialog">
        <div class="add-data-dialog">
            <div class="add-data-dialog-header">
                <span class="add-data-dialog-title">添加数据</span>
            </div>
            <div class="add-data-dialog-body">
                <div style="display:inline-block;width:420px;">
                    <label style="float:left;width:300px;text-align: left">
                        <pre style="margin: 0px; font-size: 14px;">
1. 下载数据上传工具。
2.  通过上传工具进行数据上传。
3.  数据上传完毕后，填写以下内容。
4.  确认添加。
                        </pre>
                    </label>
                    <input type="button" value="获取上传方法" class="data_btn" onclick="sendToolMethon()">
                </div>
                <hr>
                <div>
                    <form id="add_form" action="http://47.104.102.188:7979/api/user/data/add" method="post">
                        <label>数据名称</label>
                        <input type="text" class="data_input" name="data_name" id="data-name" required validateevent="true" autocomplete="off"/>
                        <br>

                        <label>路径地址</label>
                        <input type="text" class="data_input" name="data_path" id="data-path" required validateevent="true" autocomplete="off"/>
                        <br>

                        <label style="position: relative; top:-4em">数据描述</label>
                        <!--<input type="text" class="data_input" style="height: 6em;"/>-->
                        <textarea class="data_input" name="data_desc" id="data_desc" style="height: 6em;resize: none;font-size: 14px;"></textarea>
                        <br>
                        <br>
                        <input type="submit" class="add-data-btn"  id="" value="添加数据" onclick=""/>
                        <input type="button" class="add-data-btn ml50"  value="取消" onclick="addDataCancel()"/>
                    </form>
                </div>
            </div>
            <div class="add-data-dialog-footer" style="height: 40px;">

            </div>
        </div>
    </div>


    <div id="messagebox_id" class="wrap-message-box hide">
        <div class="message-box" style="width: 240px">
            <div class="message-box-header">
                <span id="msgbox_title" class="message-box-title">处理结果</span>
            </div>
            <div class="message-box-body">
                <div id="res_info" style="font-size: 13px;color: #5490f3">信息提示</div>
            </div>
            <div class="message-box-footer" >
                <input type="button" class="button_blue_style" style="width: 120px;" value="关闭" onclick="MessageBox('hide')"/>
            </div>
        </div>
    </div>

</body>
</html>